De Moivre's Theorem says if $n$ is any rational number, then $\left(\cos\theta+i\sin\theta\right)^{n}=(\cos(n\theta)+i\sin(n\theta)$. It is useful for finding higher powers of complex numbers since
$$\left[r\cdot\left(\cos\theta+i\sin\theta\right)\right]^{n}=r^{n}(\cos(n\theta)+i\sin(n\theta).$$
Also, it can be used to find roots of numbers. The obviousness of this theorem comes from already knowing Euler's formula.
$$re^{i\theta}=r\left(\cos\theta+i\sin\theta\right)$$
therefore,
$$\left(re^{i\theta}\right)^{n}=\left(r\left(\cos\theta+i\sin\theta\right)\right)^{n}$$
but by the rules for exponents,
$$\left(re^{i\theta}\right)^{n}=\left(r^{n}e^{in\theta}\right) \tag{1} \label{1}$$
and thus
$$\left(r^{n}e^{in\theta}\right)=r^{n}\left(\cos n\theta+i\sin n\theta\right).$$
Succinctly, and in reverse,
$$\begin{aligned}\left[r\left(\cos\theta+i\sin\theta\right)\right]^{n}= & \left(re^{i\theta}\right)^{n}\\
= & r^{n}e^{in\theta}\\
= & r^{n}\left(\cos n\theta+i\sin n\theta\right)
\end{aligned}$$
Example: Use De Moivre's theorem to simplify $(1+i)^{13}$. Answer: First we will express the problem in polar form. The modulus is $\sqrt{1+1}=\sqrt{2}$. The principal angle is $\tan^{-1}(1/1)=\pi/4$. So we have
$$(1+i)^{13}=\left(\sqrt{2}e^{\pi/4}\right)^{13}.$$
Next express $r=\sqrt{2}^{12}\sqrt{2}$ and use De Moivre for the angle.
$$(1+i)^{13}=\sqrt{2}^{12}\sqrt{2}\left(\cos\frac{13\pi}{4}+i\cdot\sin\frac{13\pi}{4}\right).$$
Note that we can cast out factors of $2\pi$ since going completely around the circle is rather a waste of time. So taking out $8\pi/4$ leaves
$$\sqrt{2}^{12}\sqrt{2}\left(\cos\frac{5\pi}{4}+i\cdot\sin\frac{5\pi}{4}\right)$$
and from our unit circle, we know that $\cos5\pi/4=\sin5\pi/4=-\sqrt{2}/2$. So making that substitution,
$$\sqrt{2}^{12}\sqrt{2}\cdot\left(\frac{-\sqrt{2}}{2}+i\cdot\frac{-\sqrt{2}}{2}\right)=-64-64i$$
Example: Use De Moivre's theorem to simplify $\cos(4\theta)$. By “simplify”, we mean to have nothing inside the parenthesis except the single angle $\theta$. Answer: We know that $\cos4\theta$ is one of the terms in $(\cos4\theta+i\sin4\theta)$ so let's start with $\left(\cos\theta+i\sin\theta\right)^{4}$ and expand it up. The rational way to do this is using the binomial theorem.
$$\begin{aligned}\left(\cos\theta+i\sin\theta\right)^{4}=\\
_{4}C_{0}(\cos\theta)^{4-0}(i\sin\theta)^{0}= & 1\cdot(\cos^{4}\theta)\cdot1+\\
_{4}C_{1}(\cos\theta)^{4-1}(i\sin\theta)^{1}= & 4\cdot(\cos^{3}\theta)(i\sin\theta)+\\
_{4}C_{2}(\cos\theta)^{4-2}(i\sin\theta)^{2}= & 6\cdot(\cos^{2}\theta)(-\sin^{2}\theta)+\\
_{4}C_{3}(\cos\theta)^{4-3}(i\sin\theta)^{3}= & 4\cdot(\cos\theta)(-i\sin^{3}\theta)+\\
_{4}C_{4}(\cos\theta)^{4-4}(i\sin\theta)^{4}= & 1\cdot1\cdot(\sin^{4}\theta)
\end{aligned}
$$
but since we know that $\left(\cos\theta+i\sin\theta\right)^{4}=\left(\cos4\theta+i\sin4\theta\right)$ we can set the real and imaginary parts equal.
$$\cos\left(4\theta\right)=\cos^{4}\theta-6\cos^{2}\theta\sin^{2}\theta+\sin^{4}(\theta)$$
$$\sin(4\theta)=4\cos^{3}\theta\sin\theta-4\cos\theta\sin^{3}\theta$$
There is an extension of De Moivre's Theorem that allows us to take roots of numbers, including especially complex numbers. Here we are going to use it only for finding the root of real numbers, but the procedure is the same. Before we layout the theorem, let's just look at what we have so far using Euler's Formula. Suppose we look at the cube roots of $10$. Since we want more than just the real root, we will let $z$ be a complex number.
$$z^{3}=10.$$
Example: Find the three cube roots of $10$. Answer: So z must be $re^{i\theta}$, and
$$z^{3}=r^{3}e^{3i\theta}=10 \tag{2} \label{2}$$
Now $r$ is the modulus of $z$ and since $z=(10+i\cdot0)^{1/3},$
$$r=|z|=\sqrt{\left(10^{1/3}\right)^{2}+\left(0^{1/3}\right)^{2}}=10^{1/3},$$
and $r^{3}=10$. Notice that nothing we have done and nothing that we will do here is going to help us get the principal cube root of $10!$ There are good ways to do that, such as Newton's method, but this isn't one of them.
If we divide $\eqref{2}$ by the right side, and because $r^{3}=10$, we get
$$\frac{r^{3}e^{3i\theta}}{r^{3}}=\frac{10}{10}$$
$$e^{3i\theta}=1. \tag{3} \label{3}$$
So to find $\theta$, we really didn't care about the principal value. Our answer will be $r^{1/3}e^{i\theta}$. Obviously, if $\theta=0$ we will get $e^{i\theta}=1$. If we let $\theta$ go around the circle one time, we get from $\eqref{3}$
$$3\theta=2\pi$$
and the answer is
$${\displaystyle r^{1/3}{\displaystyle e}^{\left({\displaystyle i}{\displaystyle \frac{2\pi}{3}}\right)}=\sqrt[3]{10}\left(\cos\frac{2\pi}{3}+i\sin\frac{2\pi}{3}\right)=\sqrt[3]{10}\left(-\frac{1}{2}+i\frac{\sqrt{3}}{2}\right)}.$$
If we circle around yet again,
$$r^{1/3}{\displaystyle e}^{\left({\displaystyle i}{\displaystyle \frac{4\pi}{3}}\right)}=\sqrt[3]{10}\left(\cos\frac{4\pi}{3}+i\sin\frac{4\pi}{3}\right)=\sqrt[3]{10}\left(-\frac{1}{2}-i\frac{\sqrt{3}}{2}\right).$$
We could even go around again and use $\cos\frac{6\pi}{3}$ and $\sin\frac{6\pi}{3}$ but we would find that it just returns us to the start. There are only three cube roots. If we graph these cube roots of $1$ on the complex plane, we see that they make a circle (well more like a triangle with only $3$) with the points evenly distributed around.
Theorem
Let $\omega\in\mathbb{C},\;\omega\ne0$ with $\omega=\rho(cos\,\phi+i\,sin\,\phi)$. Then there exists $n$ roots of $\omega$ given by the formula
$$\omega=\rho^{1/n}\left(cos\left(\frac{\phi+2\pi k}{n}\right)+i\,sin\left(\frac{\phi+2\pi k}{n}\right)\right)$$
where each $k\in\{0,1,\ldots,\,n-1\}$ yields a distinct $n^{th}$ root.
To find all of the $n$ roots of a number that has been given in complex form, having both a real and an imaginary part (either part may of course be zero), first convert the number to polar form and then use the theorem. Suppose we have some number, $z\in \mathbb{C}$. Then in polar form, the number is $z=r(cos\,\phi+i\,sin\,\phi)$. To find $r$ and $\phi$ use
$$r=|z|=abs(z)=\sqrt{Imag(z)^{2}+Real(z)^{2}}$$
$$\phi= \text{atan2}\left(Imag(z),Real(z)\right)=arg(z)$$
The $n$ roots are given by
$$r^{\frac{1}{n}}\left(cos\frac{\phi+2\pi k}{n}+i\,sin\frac{\phi+2\pi k}{n}\right)\quad k=0,1..(n-1)$$
Example: Find all three roots for $\sqrt[3]{7}$. Answer: $z=7+0i $
$r=abs(7)=7$
$\phi=arg(7)=0$ i.e. $\text{atan2}(0,7)=0$
$n=3$ $k=0,1,2$
$$r^{1/n}\left(cos\frac{\phi+2\pi k}{n}+i\,sin\frac{\phi+2\pi k}{n}\right)=\begin{array}{c}
1.912931182772389\\
-0.956465591386194+1.65664699997230*I\\
-0.956465591386194-1.65664699997230*I
\end{array} $$